using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace Acme.BookStore.Domain.Entities
{
    [Table("GongyingTable", Schema = "public")]
    public class Gongying : Entity<string>
    {
        [Key]
        [Column("supplier_code")]
        public override string Id { get; protected set; }

        [Required]
        [Column("full_name")]
        [StringLength(100)]
        public string FullName { get; set; }

        [Column("address")]
        public string Address { get; set; }

        [Column("phone")]
        [StringLength(20)]
        public string Phone { get; set; }

        [Column("remarks")]
        public string Remarks { get; set; }

        [Column("enterprise_attribute")]
        [StringLength(50)]
        public string EnterpriseAttribute { get; set; }

        [Column("main_contact")]
        [StringLength(50)]
        public string MainContact { get; set; }

        [Column("mobile")]
        [StringLength(20)]
        public string Mobile { get; set; }

        [Column("email_address")]
        [StringLength(100)]
        public string EmailAddress { get; set; }
        
        // 构造函数
        protected Gongying()
        {
            // 给 ORM 用的空构造函数
        }
        
        public Gongying(string id)
        {
            Id = id;
        }
    }
} 